#
#
#	Copyright Nickwu 2008
#
#

PROJECT_NAME := Woo

include ./Makefile.env

obj := $(patsubst %.cpp, lib/%.o, $(wildcard *.cpp))

.PHONY: all clean

all: $(obj)
ifeq "$(BUILD_TYPE)" "static"
	$(AR) -r target/lib$(PROJECT_NAME).a $^
else
	$(GXX) -o target/$(PROJECT_NAME).so -shared $^
endif

clean:
	rm -f *.bak
	rm -f lib/*.o
	rm -f target/*
	
lib/%.o: %.cpp
	$(GXX) $^ -c -o $@ $(INCLUDE) $(FLAG)